﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;

namespace XAPI.Domain
{
    public class ActivityDefinition
    {
        /// <summary>
        /// PK for storage
        /// </summary>
        [Key]
        public int Id { get; set; }

        /// <summary>
        /// Recommended - The human readable/visual name of the Activity
        /// </summary>
        public LanguageMap name { get; set; }

        /// <summary>
        /// Recommended - A description of the Activity.
        /// </summary>
        public LanguageMap description { get; set; }

        /// <summary>
        /// Recommended - The type of Activity.
        /// URI
        /// </summary>
        [DataType(DataType.Url)]
        public string type { get; set; }

        /// <summary>
        /// Optional SHOULD resolve to a document human-readable 
        /// information about the Activity, which MAY include a 
        /// way to 'launch' the Activity.
        /// </summary>
        [DataType(DataType.Url)]
        public string moreInfo { get; set; }

        public List<InteractionActivity> interactionActivities { get; set; }

        /// <summary>
        /// TODO: Implement extensions ---
        /// 
        /// Description - 
        /// Extensions are defined by a map. The keys of that map MUST be URLs, and the values MAY be any 
        /// JSON value or data structure. The meaning and structure of extension values under a URL key are 
        /// defined by the person who coined the URL, who SHOULD be the owner of the URL, or have 
        /// permission from the owner. The owner of the URL SHOULD make a human-readable description of 
        /// the intended meaning of the extension supported by the URL accessible at the URL. A learning record 
        /// store MUST NOT reject an Experience API Statement based on the values of the extensions map.
        /// 
        /// Extensions are available as part of Activity Definitions, as part of statement context, or as part of 
        /// some statement result. In each case, they're intended to provide a natural way to extend those 
        /// elements for some specialized use. The contents of these extensions might be something valuable to 
        /// just one application, or it might be a convention used by an entire community of practice.
        /// 
        /// Extensions should logically relate to the part of the statement where they are present. Extensions in 
        /// Statement context should provide context to the core experience, while those in the result should 
        /// provide elements related to some outcome. For Activities, they should provide additional information 
        /// that helps define an Activity within some custom application or community.
        /// 
        /// Note - 
        /// A statement should not be totally defined by its extensions, and be meaningless otherwise. 
        /// Experience API Statements should be capturing experiences among Actors and Objects, and 
        /// SHOULD always strive to map as much information as possible into the built in elements, in order to 
        /// leverage interoperability among Experience API conformant tools.
        /// </summary>
        public Dictionary<string, string> extensions { get; set; }
    }
}